package edu.gdkm.demo10;

public class ShuYaZiThread extends Thread{
    public ShuYaZiThread(String name) {
        super(name);
    }

    public ShuYaZiThread() {
    }
    public void run(){
        for(int i=0;i<=10;i++){
            System.out.println(this.getName()+"：第"+i+"只鸭子");
            try {
                Thread.sleep(500);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
